/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.ispc.core.service;

import com.intelligent.ispc.common.web.ProcessEvent;
import com.intelligent.ispc.core.dto.ToleranceItemDto;
import com.intelligent.ispc.core.dto.ToleranceResultDto;
import com.intelligent.ispc.core.dto.ToleranceSchemeDto;
import com.intelligent.ispc.core.dto.ToleranceSearchConditionDto;

import java.util.List;

/**
 * Created by Peter on 2016/8/22.
 */
public interface ToleranceService {

    List<ToleranceSchemeDto> findSchemeByProject(Long projectId);

    List<ToleranceItemDto> findItemByScheme(Long projectId, Long schemeId);

    List<ToleranceItemDto> findItemByScheme(Long schemeId);

    boolean isSchemeExistInProject(Long projectId, String schemeName);

    void createScheme(ToleranceSchemeDto toleranceSchemeDto);

    void importScheme(ToleranceSchemeDto toleranceSchemeDto, String filePath, ProcessEvent processEvent);

    void deleteScheme(Long id);

    void createItem(ToleranceItemDto toleranceItemDto);

    void updateItem(ToleranceItemDto toleranceItemDto);

    void deleteItem(Long id);

    ToleranceResultDto analysis(ToleranceSearchConditionDto conditionDto);

    void export(ToleranceSearchConditionDto conditionDto);

}
